import Main from "@/component/Main.vue";
import Register from "@/component/Register.vue";
import {createMemoryHistory, createRouter} from "vue-router";
import Login from "@/component/Login.vue";
import Picture from "@/component/Picture.vue";

const routes = [
    { path: '/', component: Main },
    { path: '/toLogin', component: Login },
    { path: '/toRegister', component: Register },
    { path: '/toPicture', component: Picture },
]

const router = createRouter({
    history: createMemoryHistory(),
    routes,
})

//将rooter对象暴露给外部使用
export default router